Skip to content

fix(validator): improve validateObject and validateValueForProperty methods#2130

Merged
brendt merged 6 commits into
tempestphp:3.xfrom
tux-eithel:fix/improve-validateObject
Jun 5, 2026
Merged

fix(validator): improve validateObject and validateValueForProperty methods#2130
brendt merged 6 commits into
tempestphp:3.xfrom
tux-eithel:fix/improve-validateObject

Conversation

@tux-eithel

@tux-eithel tux-eithel commented May 16, 2026

Copy link
Copy Markdown
Contributor

Fix #2131.

I added several assertions for the exception.
Let me know if they're okay, or should be moved in a specific test inside tests/Integration/Validator.

@tux-eithel tux-eithel closed this May 16, 2026
@tux-eithel tux-eithel deleted the fix/improve-validateObject branch May 16, 2026 18:02
@tux-eithel tux-eithel restored the fix/improve-validateObject branch May 16, 2026 18:04
@tux-eithel tux-eithel reopened this May 16, 2026
@tux-eithel tux-eithel changed the title Fix: improve validateObject and validateValueForProperty methods fix(validator): improve validateObject and validateValueForProperty methods May 16, 2026
@brendt

brendt commented May 22, 2026

Copy link
Copy Markdown
Member

Nice, I'm happy to merge this :) And sorry for the late reply!

Can you take a look at that one failing test?

@tux-eithel

Copy link
Copy Markdown
Contributor Author

Hi @brendt !

Done!

@tux-eithel

Copy link
Copy Markdown
Contributor Author

Do you think is worth adding documentation for validateObject method? I don't see it's mentioned in https://tempestphp.com/3.x/features/validation.

If the feature can be made public, I can open another PR, with documentation improvements.

Let me know!

@brendt

brendt commented May 26, 2026

Copy link
Copy Markdown
Member

Definitely worth documenting! Feel free to send a followup PR

@brendt brendt merged commit df60cc7 into tempestphp:3.x Jun 5, 2026
75 checks passed
@brendt

brendt commented Jun 5, 2026

Copy link
Copy Markdown
Member

Thanks! Will tag in a second

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validator throw a ValidationFailed exception when validateObject is used even if object is valid

2 participants